Skip to content

Fix four bugs: ForIn body dropped, step max error, setLuaVersion case, Lua52 refs#240

Merged
levno-710 merged 1 commit into
masterfrom
fix/four-bugs
Jun 15, 2026
Merged

Fix four bugs: ForIn body dropped, step max error, setLuaVersion case, Lua52 refs#240
levno-710 merged 1 commit into
masterfrom
fix/four-bugs

Conversation

@levno-710

Copy link
Copy Markdown
Member

Summary

Fixes four bugs found in the Prometheus Lua obfuscator codebase:

  1. ForInStatement body visits were silently dropped (visitast.lua:142) — visitBlock result was not assigned back to statement.body, causing AST transformations inside for ... in loops to be lost.
  2. Step max validation showed wrong value (step.lua:58) — Error message used data.min instead of data.max.
  3. Pipeline:setLuaVersion didn't update the Unparser (pipeline.lua:136) — Unparser checks LuaVersion (capital L/V) but setLuaVersion passed luaVersion (lowercase), causing the Unparser to silently fall back to LuaU.
  4. Removed references to unsupported Lua52 (SplitStrings.lua) — Replaced LuaVersion.Lua52 with LuaVersion.Lua51.

@levno-710 levno-710 merged commit cc7cd25 into master Jun 15, 2026
1 check passed
@levno-710 levno-710 deleted the fix/four-bugs branch June 15, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant